package com.liuya.base;

import com.github.pagehelper.Page;

import java.io.Serializable;
import java.util.List;
import java.util.Map;

/**
 * @author liuya
 * @date 20160823
 */

public interface BaseMapper<T extends BaseModel> extends Serializable{

    List<T> selectAll(Map<String, Object> params);

    int deleteByPrimaryKey(String id);

    int deleteBy(Map param);

    T selectByPrimaryKey(String id);

    int insert(T record);

    int batchSave(List params);

    int batchDelete(List params);

    int updateByPrimaryKey(T record);

    /**
     * 条件分页查询
     */
    Page<String> query(Map<String, Object> params);
}